package com.uyayo.system.authority.service;

import java.util.List;

import com.uyayo.framework.common.exception.CodeMultipleException;
import com.uyayo.framework.common.exception.ParentNotFoundException;
import com.uyayo.system.authority.entity.SysResource;
import com.uyayo.system.authority.model.SysResourceCondition;

public interface SysResourceService {

	List<SysResource> selectSysResourceByUserId(SysResourceCondition sysResourceCondition);

	List<SysResource> selectSysResource(SysResourceCondition sysResourceCondition);

	List<SysResource> resourceTreeGrid(SysResource resource);

	List<SysResource> selectResourceAll(SysResource resource);

	SysResource selectResourceById(String id);

	/**
	 * 根据上级Id获取记录数
	 * @param parentId 上级id
	 * @return int
	 */
	int selectCountByParentId(String parentId);

	int saveResource(SysResource resource) throws CodeMultipleException, ParentNotFoundException;

	int updateResource(SysResource resource) throws ParentNotFoundException, CodeMultipleException;

	int deleteResource(String id);
}
